import Vue from 'vue';
import Router from 'vue-router';
import Nyn from '@/view/nyn'
import Index from '@/view/index'
import Tools from '@/view/tools'
import Autotest from '@/view/autotest'
import Home from '@/view/home'


Vue.use(Router);
const router = new Router({
    mode: 'history', // 路由不再展示/#/
    routes: [{
        path: '/home',
        component: Home,
        children: [
            {
                path: '/nyn',
                component: Nyn,
            }, {
                path: '/tools',
                component: Tools,
            }, {
                path: '/autotest',
                component: Autotest,
            }
        ],
        redirect: '/tools',
    },
        {
            path: '/index',
            component: Index,
        }, {
            path: '/',
            redirect: '/home',
        }]
});

export default router;
